package com.it.shiro.controller;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.subject.Subject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName:MobileController
 * Package:com.it.shiro.controller
 * Description: 描述信息
 *
 * @date:2022/3/30 11:01
 * @author:动力节点
 */
@RestController
@RequestMapping("/mobile")
public class MobileController {


    @RequiresPermissions("mobile")
    @GetMapping("/query")
    public String query(){
//        Subject currentUser = SecurityUtils.getSubject();
//        if (currentUser.isPermitted("mobile")) {
//            return "mobile";
//        }
        return "mobile";
    }

}
